﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.MediaCenter;
using Microsoft.MediaCenter.Hosting;
using Microsoft.MediaCenter.UI;

namespace TV4Home.Client.WMC.TVClient.UI
{
    /// <summary>
    /// Acts as a base page for all MCE pages and provides standard look and feel like time, etc.
    /// </summary>
    public abstract class PageBase : ModelItem
    {
        #region Constructor
        public PageBase()
        {
            SetupTimer();
        }
        #endregion

        #region Properties
        public string Time
        {
            get
            {
                return DateTime.Now.ToShortTimeString();
            }
        }
        #endregion

        #region Private Methods
        private void SetupTimer()
        {
            System.Threading.Timer timer = new System.Threading.Timer(state => FirePropertyChanged("Time"), null, 0, 1000);
        }
        #endregion
    }
}
